package com.audaque.springboot.foshanupload;

import com.audaque.springboot.foshanupload.web.flinkdemo.component.Consumer;
import com.audaque.springboot.foshanupload.web.flinkdemo.component.Producer;
import com.audaque.springboot.foshanupload.web.flinkdemo.main.KafkaFlinkStreaming;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @Auther: gzq
 * @Date: 2021/1/27 - 01 - 27 - 13:24
 * @Description: nevt.start
 */
@SpringBootApplication
public class FlinkDemoWebJarKafkaFlinkStreamingJob {
    public static void main(String[] args) throws Exception{
        ConfigurableApplicationContext context = SpringApplication.run(FlinkDemoWebJarKafkaFlinkStreamingJob.class, args);
        Consumer consumer = context.getBean(Consumer.class);
        consumer.run();
        Producer producer = context.getBean(Producer.class);
        producer.run();
        Thread.sleep(3000);
        KafkaFlinkStreaming kafka_flink = context.getBean(KafkaFlinkStreaming.class);
        kafka_flink.run();


    }
}
